package com.zimin.cloud.user.service.impl;

import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.zimin.cloud.mine.pojo.user.view.UserVO;
import com.zimin.cloud.user.pojo.entity.User;
import com.zimin.cloud.user.mapper.UserMapper;
import com.zimin.cloud.user.service.IUserService;
import com.zimin.mapper.injector.InjectServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户表 服务实现类
 * </p>
 *
 * @author zimin
 * @since 2022-06-14 15:53
 */
@Service("userService")
public class UserServiceImpl extends InjectServiceImpl<UserMapper, User> implements IUserService {

    @Override
    public UserVO getUserByPhone(String phone) {
        return getOne(lambdaQuery().eq(User::getPhone, phone),UserVO.class);
    }
}
